﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HelloPrism.Models.Services
{
    class RestaurantService : IRestaurantService
    {
        public Restaurant GetRestaurantInfo()
        {
            return new Restaurant()
            {
                Name = Properties.Settings.Default.RestaurantName,
                Address = Properties.Settings.Default.RestaurantAddress,
                Phone = Properties.Settings.Default.RestaurantPhone,
            };
        }

        public void SetRestaurantInfo(Restaurant info)
        {
            Properties.Settings.Default.RestaurantName = info.Name;
            Properties.Settings.Default.RestaurantAddress = info.Address;
            Properties.Settings.Default.RestaurantPhone = info.Phone;
            Properties.Settings.Default.Save();
        }
    }
}
